package design.mode.decorator;



/**
 * @author ZhongMingde on 2021/11/4
 */

public class DataInputStream extends InputStream {

  protected volatile InputStream in;

  public DataInputStream() {
  }

  public DataInputStream(InputStream in) {
    this.in = in;
  }

  @Override
  public int read(byte[] b) {
    return read(b, 0, b.length);
  }

  @Override
  public int read(byte[] b, int off, int len) {
    return 1;
  }
}
